home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-06-04 | 22.0 KB | 860 lines | [TEXT/MPS ] |
- /*
- * File: Application.cp
- *
- * Contains: xxx put contents here xxx
- *
- * Written by: Rick Violet
- *
- * Copyright: © 1992 by Apple Computer, Inc., all rights reserved.
- *
- * Change History (most recent first):
- *
- * 10/16/94 SBR Threaded App and RequestDispatcher
- * 11/18/92 RV xxx put comment here xxx
- *
- * To Do:
- */
-
- // Mac Includes
- #include <QuickDraw.h>
- #include <Fonts.h>
- #include <Controls.h>
- #include <Windows.h>
- #include <Menus.h>
- #include <TextEdit.h>
- #include <Dialogs.h>
- #include <ToolUtils.h>
- #include <Memory.h>
- #include <SegLoad.h>
- #include <Traps.h>
- #include <GestaltEqu.h>
- #include <EPPC.h>
- #include <CursorCtl.h>
- #include "new.h"
-
- #ifndef __Application__
- #include "Application.h"
- #endif
-
- #ifndef __RequestDispatcher__
- #include "RequestDispatcher.h"
- #endif
-
- #ifndef __AERequest__
- #include "AERequest.h"
- #endif
-
- #ifndef __Configuration__
- #include "Configuration.h"
- #endif
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // CONSTANTS
- //—————————————————————————————————————————————————————————————————————————————————————
- // Size of Application Heap space and Stack space needed
- const long kHeapSpaceNeeded = (100 * 1024); // Heap Space in bytes
- const long kStackSpaceNeeded = (100 * 1024); // Stack Space in bytes
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Constants to use when being Multi-Finder aware
- const short kOsEvent = app4Evt; // event used by MultiFinder
- const short kSuspendResumeMessage = 0x01; // high byte of suspend/resume event message
- const short kClipConvertMask = 0x02; // bit of message field clip conversion
- const short kResumeMask = 0x01; // bit of message field for resume vs. suspend
- const short kMouseMovedMessage = 0xFA; // high byte of mouse-moved event message
-
- //—————————————————————————————————————————————————————————————————————————————————————
- #ifndef THINK_CPLUS
- #ifndef __MWERKS__
- extern "C"
- {
- // from MPW standard library
- void _DataInit(void); // sets up A5 globals
- };
- #endif
- #endif
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Global Variables
- //—————————————————————————————————————————————————————————————————————————————————————
- Application* gTheApplication;
- extern RequestDispatcher* gTheRequestDispatcher;
-
- Configuration gConfiguration;
- Ptr gStrippedAddress = NULL;
-
- /*SBR Hacked this in 10/16/94 */
- ThreadID gRequestDispatcherThreadID = kNoThreadID;
- long gRDThreadReturnValue;
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // main - the main entry point
- //—————————————————————————————————————————————————————————————————————————————————————
- int
- main(void)
- {
- gTheApplication = new Application() ;
- if( gTheApplication )
- {
- gTheApplication->Run();
- delete gTheApplication;
- }
-
- return 0;
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // AEOpenHandler - handles 'aevt' 'oapp' apple event
- //—————————————————————————————————————————————————————————————————————————————————————
- pascal OSErr
- AEOpenHandler (AppleEvent*, AppleEvent*, long )
- {
- // Standard (empty) handler for the 'oapp' Apple Event. Our program does
- // not need anything special here, so "noErr" can simply be returned.
-
- return(noErr);
- }
-
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // AEOpenDocHandler - handles 'aevt' 'odoc' apple event
- //—————————————————————————————————————————————————————————————————————————————————————
- pascal OSErr
- AEOpenDocHandler (AppleEvent*, AppleEvent*, long )
- {
- // Standard (empty) handler for the 'odoc' Apple Event. Our program does
- // not have documents, so we ignore this Apple Event.
-
- return(noErr);
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // AEPrintHandler - handles 'aevt' 'pdoc' apple event
- //—————————————————————————————————————————————————————————————————————————————————————
- pascal OSErr
- AEPrintHandler (AppleEvent*, AppleEvent*, long )
- {
- // Standard (empty) handler for the 'pdoc' Apple Event. Our program does
- // not have documents, so we ignore this Apple Event.
-
- return(noErr);
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // AEQuitHandler - handles 'aevt' 'quit' apple event
- //—————————————————————————————————————————————————————————————————————————————————————
- pascal OSErr
- AEQuitHandler (AppleEvent*, AppleEvent*, long )
- {
- // Standard handler for the 'quit' Apple Event. You must never, ever call
- // ExitToShell from within an Apple Event handler. It is certain death
- // for your application. Thus, we just set a flag which is examined later
- // in the main event loop.
-
- gTheApplication->DoMenuCommand( kFileMenuID, kQuitItem );
- return(noErr);
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application Object
- //—————————————————————————————————————————————————————————————————————————————————————
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::Application - constructor
- //—————————————————————————————————————————————————————————————————————————————————————
- Application::Application(void)
- {
- //———— First things first
- InitializeToolBox();
- GetThisProcessInfo();
-
- //———— initialize our class variables
- fDone = false;
- fInBackground = false;
- fWhichWindow = nil;
- fMessagePtrOrig = nil;
- fReplyPtrOrig = nil;
- fSleepTicks = 1;
-
- //———— Install Handlers for oapp, odoc, pdoc, quit
- //———— the 4 required Apple events
- if( InstallRequiredAEHandlers() != noErr )
- TerminalError( kAppErrStrings, kAppInitFail );
-
- //———— Install Handler for 'v.u.' Apple events
- if( AERequest::InstallAppleEventHandler() != noErr )
- TerminalError( kAppErrStrings, kAppInitFail );
-
- //———— construct the RequestDispatcher object
- //———— create a new thread for it if application is threaded
- CreateRequestDispatcher();
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::~Application - destructor
- //—————————————————————————————————————————————————————————————————————————————————————
- Application::~Application(void)
- {
- if( gTheRequestDispatcher )
- {
- if( fIsThreaded )
- DisposeThread( gRequestDispatcherThreadID, &gRDThreadReturnValue, false );
-
- delete gTheRequestDispatcher;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::InstallRequiredAEHandlers
- //—————————————————————————————————————————————————————————————————————————————————————
- OSErr
- Application::InstallRequiredAEHandlers(void)
- {
- OSErr tErr;
-
- //———— Setup the AppleEvent Handlers
- //———— Setup 'oapp' handler
- tErr = AEInstallEventHandler(kCoreEventClass,
- kAEOpenApplication,
- NewAEEventHandlerProc(AEOpenHandler),
- 0, false);
- if (tErr != noErr)
- return tErr;
-
- //———— Setup 'odoc' handler
- tErr = AEInstallEventHandler(kCoreEventClass,
- kAEOpenDocuments,
- NewAEEventHandlerProc(AEOpenDocHandler),
- 0, false);
- if (tErr != noErr)
- return tErr;
-
- //———— Setup 'pdoc' handler
- tErr = AEInstallEventHandler(kCoreEventClass,
- kAEPrintDocuments,
- NewAEEventHandlerProc(AEPrintHandler),
- 0, false);
- if (tErr != noErr)
- return tErr;
-
- //———— Setup 'quit' handler
- tErr = AEInstallEventHandler(kCoreEventClass,
- kAEQuitApplication,
- NewAEEventHandlerProc(AEQuitHandler),
- 0, false);
- if (tErr != noErr)
- return tErr;
-
- return noErr;
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::SleepVal
- //—————————————————————————————————————————————————————————————————————————————————————
- unsigned long
- Application::SleepVal(void)
- {
- if ( !fInBackground )
- {
- return GetCaretTime();
- }
- else
- {
- return fSleepTicks;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::Run
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::Run(void)
- {
- while( !fDone )
- {
- DoEvent();
-
- /*SBR Hacked this in 10/16/94 */
- if( fIsThreaded )
- {
- //———— In case a non-threaded service was queued, suggest this thread
- //———— to ensure threaded service do not get any time.
- //———— The application *always* yields to the RequestDispatcher.
- YieldToThread( gRequestDispatcherThreadID );
- }
- else
- {
- gTheRequestDispatcher->DoRequests();
- }
- }
-
- //———— Clean up, cancel requests, etc.
- ExitLoop();
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::ExitLoop
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::ExitLoop(void)
- {
- /*SBR Hacked this out 10/16/94 */
- //gTheRequestDispatcher->CancelCurrentRequest()
-
- /*SBR Hacked this in 10/16/94 */
- if( fIsThreaded )
- {
- while( !gTheRequestDispatcher->CancelAllRequests() )
- {
- YieldToAnyThread();
- SystemTask();
- }
- }
- else
- {
- //———— If application is not threaded, the only thing to do
- //———— is cancel all and return, since returning is only way
- //———— to give time to the request we want to cancel.
- gTheRequestDispatcher->CancelAllRequests();
- return ;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoEvent
- //—————————————————————————————————————————————————————————————————————————————————————
- Boolean
- Application::DoEvent( unsigned long pSleepTicks, short pEventMask )
- {
- Boolean tHaveEvnt;
- EventRecord tEvent;
-
- if( pSleepTicks == 0 )
- {
- pSleepTicks = SleepVal();
- }
-
- //———— Get the next event from the Event Queue
- tHaveEvnt = WaitNextEvent( pEventMask, &tEvent, pSleepTicks, nil );
- fTheEvent = tEvent;
-
- if ( tHaveEvnt )
- {
- switch (fTheEvent.what)
- {
- //———— mouseDown
- case mouseDown:
- {
- DoMouseDown();
- }
- break;
-
- //———— Key Down Event
- case keyDown:
- case autoKey:
- {
- DoKeyDown();
- }
- break;
-
- //———— OSEvent
- case kOsEvent:
- {
- DoOSEvent();
- }
- break;
-
- //———— High Level Event
- case kHighLevelEvent:
- {
- DoHighLevelEvent();
- }
- break;
-
- //———— all others
- default:
- {
- }
- break;
- }
- }
- return tHaveEvnt;
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoMouseDown
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::DoMouseDown()
- {
- long tMenuSelectResult;
- short tPartCode;
- WindowPtr tWind;
- EventRecord tEvent;
-
- //———— Determine which window
- tPartCode = FindWindow( fTheEvent.where, &tWind );
-
- //———— Save this fact
- fWhichWindow = tWind;
-
- //———— Get a copy of the event
- tEvent = fTheEvent;
-
- switch( tPartCode )
- {
- case inSysWindow:
- {
- DoMouseInSysWindow();
- }
- break;
-
- case inDrag:
- {
- DragWindow(tWind, fTheEvent.where, &qd.screenBits.bounds);
- }
- break;
-
- case inMenuBar:
- {
- tMenuSelectResult = MenuSelect( tEvent.where );
- if( tMenuSelectResult != 0 )
- {
- DoMenuCommand( HiWord( tMenuSelectResult ), LoWord( tMenuSelectResult ) );
- }
- }
- break;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoKeyDown
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::DoKeyDown()
- {
- char tKey;
- long tMenuKeyResult;
-
- tKey = (char) (fTheEvent.message & charCodeMask);
-
- //———— if its a Request key
- //———— and not a auto-key
- if( (fTheEvent.modifiers & cmdKey) && (fTheEvent.what == keyDown) )
- {
- tMenuKeyResult = MenuKey( tKey );
- if( tMenuKeyResult != 0 )
- {
- //———— Do Request key menu selection
- DoMenuCommand( HiWord( tMenuKeyResult ), LoWord( tMenuKeyResult ) );
- }
- else
- {
- //———— Do ordinary key stroke
- }
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoOSEvent
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::DoOSEvent(void)
- {
- unsigned char tEventType;
-
- //———— is it a multifinder event?
- //———— high byte of message is type of event
- tEventType = (unsigned char) (fTheEvent.message >> 24) & 0x00ff;
- switch ( tEventType )
- {
- case kMouseMovedMessage:
- {
- }
- break;
-
- case kSuspendResumeMessage:
- {
- fInBackground = !fInBackground;
- if( !fInBackground )
- {
- InitCursor();
- }
- }
- break;
-
- default:
- {
- }
- break;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoHighLevelEvent
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::DoHighLevelEvent()
- {
- OSErr tErr;
-
- tErr = AEProcessAppleEvent( &fTheEvent );
-
- //———— see AERequest.cp and Request.cp for details
- FixAEManagerBugPart2();
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::DoMenuCommand
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::DoMenuCommand( short tMenuID, short tMenuItem )
- {
- short tItemHit;
- Str255 tDAName;
- short tDARefNum;
-
- switch ( tMenuID )
- {
- //———— Apple Menu
- case kAppleMenuID:
- {
- switch ( tMenuItem )
- {
- //———— About
- case kAboutItem:
- {
- tItemHit = Alert( kAboutAlertID, nil );
- }
- break;
-
- //———— Desk Accessory
- default:
- {
- GetItem( GetMHandle( kAppleMenuID ), tMenuItem, tDAName );
- tDARefNum = OpenDeskAcc( tDAName );
- }
- break;
- }
- }
- break;
-
- //———— File Menu
- case kFileMenuID:
- {
- switch ( tMenuItem )
- {
- //———— Quit
- case kQuitItem:
- {
- Terminate();
- }
- break;
- }
- break;
- }
- }
-
- //———— unhighlight what MenuSelect (or MenuKey) hilited
- HiliteMenu(0);
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::Terminate
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::Terminate(void)
- {
- fDone = true;
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::InitializeToolBox
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::InitializeToolBox(void)
- {
- OSErr tErr;
- long heapSize;
-
- /*SBR Hacked this in from Application::Application() 10/16/94 */
- Handle tMenuBarHandle;
- MenuHandle tAppleMenu;
-
- //———— initialize Mac Toolbox components
- InitGraf((Ptr) &qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(0);
- InitCursor();
-
- //———— Unload data segment: note that _DataInit must not be in Main!
- //———— Ignore if using Think C++ or MetroWerks
- #ifndef THINK_CPLUS
- #ifndef __MWERKS__
- UnloadSeg( (ProcPtr) _DataInit );
- #endif
- #endif
-
- //———— Build the menu bar before displaying any dialogs
- //———— This shows which application displayed the dialog
- tMenuBarHandle = GetNewMBar( kMenuBarID );
- if( tMenuBarHandle )
- {
- SetMenuBar( tMenuBarHandle );
- DisposHandle( tMenuBarHandle );
- }
- //———— add Apple Menu Items
- tAppleMenu = GetMHandle( kAppleMenuID );
- if( tAppleMenu )
- {
- AddResMenu( tAppleMenu, 'DRVR' );
- }
- DrawMenuBar();
-
- //———— set the global gConfiguration
- DefineConfiguration( gConfiguration );
-
- //———— Are we running on a 128K ROM machine or better?
- if ( !gConfiguration.hasROM128K )
- {
- TerminalError( kAppErrStrings, kWrongMachineErr );
- }
-
- /*SBR Hacked this 10/16/94 */
- //———— Are we running on a platform with the Process Manager?
- //———— (this implies System 7.0 or later)
- if ( !gConfiguration.hasProcessMgr )
- {
- TerminalError( kAppErrStrings, kWrongSysSWVers );
- }
- else
-
- //———— if we need more stack space, get it now
- if ( kStackSpaceNeeded > StackSpace())
- {
- //———— new address is heap size + current stack - needed stack
- SetApplLimit((Ptr) ((long) GetApplLimit() - kStackSpaceNeeded + StackSpace()));
- tErr = MemError();
- if( tErr != noErr )
- {
- TerminalError( kAppErrStrings, kSmallSizeErr );
- }
- }
- //———— Check for minimum heap size
- heapSize = (long)GetApplLimit() - (long)ApplicZone();
- if( heapSize < kHeapSpaceNeeded )
- {
- TerminalError( kAppErrStrings, kSmallSizeErr );
- }
- //———— expand the heap so new code segments load at the top
- //———— MaxApplZone() must be called before creating any new threads
- MaxApplZone();
-
-
- //———— SBR 10/16/94 Hacked this in from RequestDispatcher::RequestDispatcher()
- //———— Make sure that AppleEvents are available, in the right version
- if( !gConfiguration.hasAppleEventMgr101 )
- {
- TerminalError( kAppErrStrings, kAppleEventVersionErr );
- }
-
- //———— Check if there are any threads at all
- if( gConfiguration.hasThreadMgr )
- {
- fIsThreaded = true;
- }
- else
- {
- //———— To allow non-threaded operation, do not terminate here
- // TerminalError( kAppErrStrings, kThreadVersionErr );
-
- fIsThreaded = false;
- DebugStr( "\pApplication::InitializeToolBox- fIsThreaded = false. Type cmd-g to continue." );
- }
-
- //———— Setup for spinning cursor
- //———— Ignore if using Think C++ or MetroWerks
- #ifndef THINK_CPLUS
- #ifndef __MWERKS__
- InitCursorCtl( nil );
- #endif
- #endif
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::GetThisProcessInfo
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::GetThisProcessInfo()
- {
- fProcessInfo.processNumber.highLongOfPSN = 0;
- fProcessInfo.processNumber.lowLongOfPSN = kCurrentProcess;
-
- fProcessInfo.processInfoLength = sizeof(ProcessInfoRec);
- fProcessInfo.processName = (StringPtr)&fProcessName;
- fProcessInfo.processAppSpec = NULL;
-
- if( GetProcessInformation(&fProcessInfo.processNumber, &fProcessInfo) == noErr )
- {
- ProcessSerialNumber tCurrPSN, tFrontPSN;
-
- GetCurrentProcess( &tCurrPSN );
- GetFrontProcess( &tFrontPSN );
-
- SameProcess( &tCurrPSN, &tFrontPSN, &fInBackground );
- fInBackground = !fInBackground;
- }
- else
- {
- fInBackground = true;
- }
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::TrapAvailable
- //—————————————————————————————————————————————————————————————————————————————————————
- Boolean
- Application::TrapAvailable(short tNumber,TrapType tType)
- {
- // Check and see if the trap exists. On 64K ROM machines, tType will be ignored.
- return NGetTrapAddress(tNumber, tType) != NGetTrapAddress(_Unimplemented, OSTrap);
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::SpinTheCursor
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::SpinTheCursor()
- {
- #ifndef THINK_CPLUS
- #ifndef __MWERKS__
- SpinCursor( 0 );
- #endif
- #endif
-
- DoEvent( 10, everyEvent );
- }
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // TerminalError
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- TerminalError( short errResID, short errCode )
- {
- Str255 message;
-
- SetCursor(&qd.arrow);
- GetIndString(message, errResID, errCode);
- ParamText(message, "\p", "\p", "\p");
- Alert(kUserAlertID, /*(ModalFilterProcPtr)*/ nil);
-
- delete gTheApplication;
-
- ExitToShell();
- }
-
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::SetSleepTicks()
- //—————————————————————————————————————————————————————————————————————————————————————
- long
- Application::SetSleepTicks( long pSleepTicks )
- {
- long prevTicks = fSleepTicks;
- fSleepTicks = pSleepTicks;
- return prevTicks;
- }
-
-
- /*SBR Hacked this in 10/16/94 */
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::CreateRequestDispatcher()
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::CreateRequestDispatcher()
- {
- OSErr theErr;
-
- //———— construct the RequestDispatcher object
- gTheRequestDispatcher = new RequestDispatcher();
- if( gTheRequestDispatcher == nil )
- {
- TerminalError( kDispatcherErrStrings, kDispatcherConstructErr );
- }
- //———— initialize beachball position
- fCursorTicks = 0;
-
- //———— if there are no threads, we are done
- if( !fIsThreaded )
- return;
-
- //———— create the RequestDispatcher thread
- theErr = NewThread( kCooperativeThread,
- (ThreadEntryProcPtr)&RequestDispatcherThread, 0, 0,
- kNewSuspend + kCreateIfNeeded + kFPUNotNeeded, 0,
- &gRequestDispatcherThreadID );
-
- if( theErr != noErr )
- {
- DebugStr("\pDid not create gRequestDispatcherThreadID");
- }
-
- theErr = SetThreadState( gRequestDispatcherThreadID, kReadyThreadState, kNoThreadID );
-
- if( theErr != noErr )
- {
- DebugStr( "\pError setting gRequestDispatcherThreadID to kReadyThreadState" );
- }
- }
-
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // RequestDispatcherThread
- //—————————————————————————————————————————————————————————————————————————————————————
- void*
- RequestDispatcherThread( void *threadParam )
- {
- if (threadParam) ;
-
- //———— based on RequestDispatcher::DoOneRequest()
- gTheRequestDispatcher->DoRequests();
-
- return nil;
- }
-
-
-
- //—————————————————————————————————————————————————————————————————————————————————————
- // Application::FixAEManagerBugPart2 - delete the Apple Event and its result to fix a bug.
- //—————————————————————————————————————————————————————————————————————————————————————
- void
- Application::FixAEManagerBugPart2()
- {
- OSErr tErr = noErr;
-
- //———— Skip if pointers are nil, i.e. FixAEManagerBugPart1() was not executed
- if( fMessagePtrOrig == nil )
- return;
-
- //———— Delete the original message AppleEvent Record
- tErr = AEDisposeDesc( fMessagePtrOrig );
-
- if( tErr != noErr )
- {
- DebugStr("\pRequest::FixAEManagerBugPart2 Error AEDisposeDesc gTheApplication->fMessagePtrOrig.");
- }
-
- //———— Delete the original reply AppleEvent Record
- tErr = AEDisposeDesc( fReplyPtrOrig );
-
- if( tErr != noErr )
- {
- DebugStr("\pRequest::FixAEManagerBugPart2 Error AEDisposeDesc gTheApplication->fReplyPtrOrig.");
- }
-
- }
-
-